/*******************************************************************************
 * Copyright (c) 2003 Object Knowledge Center B.V. (OKC), Object Knowledge
 * Center Group Ltd. (OKC-Group).
 *
 * This file is part of the Raw SOAP message sender plugin for Eclipse.

 * The Raw SOAP message sender plugin for Eclipse is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License as published by the Free Software Foundation;
 * either version 2 of the License, or (at your option) any later version.
 * 
 * The Raw SOAP message sender plugin for Eclipse is distributed
 * in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
 * even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with the Raw SOAP message sender plugin for Eclipse;
 * if not, write to the Free Software Foundation, Inc.,
 * 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *  
 *******************************************************************************/

package villa.tools.mq.preferences;

import villa.tools.mq.Activator;

import org.eclipse.jface.preference.BooleanFieldEditor;
import org.eclipse.jface.preference.ColorFieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;

/**
 * Raw Message Sender Preference Page
 * 
 * @author E.A. van Rooijen
 * @version $Revision: 1.1 $ $Date: 2003/09/29 20:41:39 $
 * 
 * @pbt.cvs.log
 * 
 * $Log: RawMessageSenderPreferencePage.java,v $
 * Revision 1.1  2003/09/29 20:41:39  basilisk
 * *** empty log message ***
 *
 * Revision 1.3  2003/09/21 16:31:39  u1077
 * *** empty log message ***
 *
 * Revision 1.2  2003/09/09 20:37:35  u1077
 * *** empty log message ***
 *
 * Revision 1.1  2003/08/31 10:50:03  u1077
 * Added 0.0.3 features
 *
 * 
 */
public class RawMessageSenderPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {

	public RawMessageSenderPreferencePage() {
		super(FieldEditorPreferencePage.GRID);
		setPreferenceStore(Activator.getDefault().getPreferenceStore());
	}

	/**
	 * Initialize the preferences
	 * 
	 * @param workbench The workbench
	 */
	public void init(IWorkbench workbench) {
		
	}

	/**
	 * Set the defaults
	 */
	protected void performDefaults() {
		super.performDefaults();
	}

	/**
	 * Apply the new preferences
	 */
	public boolean performOk() {
		return super.performOk();
	}

	/**
	 * Create the field editors
	 */
	protected void createFieldEditors() {
		BooleanFieldEditor wrap =
			new BooleanFieldEditor(IPreferenceConstants.WRAP,
								   "Wrap XML",
								   getFieldEditorParent());
		addField(wrap);
		
		BooleanFieldEditor prettyPrintResponse =
			new BooleanFieldEditor(IPreferenceConstants.PRETTY_PRINT_RESPONSE,
								   "Pretty Print Response",
								   getFieldEditorParent());
		addField(prettyPrintResponse);

		ColorFieldEditor xmlTextColor =
			new ColorFieldEditor(IPreferenceConstants.XML_TEXT_COLOR,
								 "XML Text Highlight Color",
								 getFieldEditorParent());
		addField(xmlTextColor);

		ColorFieldEditor xmlTagColor =
			new ColorFieldEditor(IPreferenceConstants.XML_TAG_COLOR,
								 "XML Element Highlight Color",
								 getFieldEditorParent());
		addField(xmlTagColor);

		ColorFieldEditor xmlAttributeColor =
			new ColorFieldEditor(IPreferenceConstants.XML_ATTRIBUTE_COLOR,
								 "XML Attribute Highlight Color",
								 getFieldEditorParent());
		addField(xmlAttributeColor);

		ColorFieldEditor xmlCommentColor =
			new ColorFieldEditor(IPreferenceConstants.XML_COMMENT_COLOR,
								 "XML Comment Highlight Color",
								 getFieldEditorParent());
		addField(xmlCommentColor);
	}

}
